<template>
  <div class="appointment_nav">
    <div class="nav">
      <div class="navlis" v-for="(item, index) in category" :key="index" @click="toProjectList(item.id)">
        <div class="imageBox">
          <img :src="item.thumb" alt="" />
        </div>
        <div class="txt">{{ item.name }}</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    category: {
      type: null
    }
  },
  data() {
    return {};
  },
  methods: {
    toProjectList(id) {
      this.$router.push(this.fun.getUrl("ProjectList", { category_id: id }));
    }
  }
};
</script>
<style lang="scss" scoped>
.appointment_nav {
  padding: 0 0.5rem;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  .nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin-top: 1rem;
    .navlis {
      overflow: hidden;
      flex-shrink: 0;
      width: 25%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: 0.88rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      .txt {
        width: 100%;
        flex: 1;
        font-size: 0.81rem;
        color: #000000;
        line-height: 0.94rem;
        margin-top: 0.56rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .imageBox {
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 50%;
        img {
          width: 3.25rem;
          height: 3.25rem;
          border-radius: 50%;
        }
      }
    }
  }
}
</style>
